import React, {Component} from 'react';
import IndexRouter from "./router";
import store from "./redux/store";

export default class App extends Component {
    state = {
        tabbarShow: true
    }

    componentDidMount() {
        store.subscribe(() => {
            console.log(store.getState())
            this.setState({
                tabbarShow: store.getState().tabbarShow
            })
        })
    }

    render() {
        return (
            <div>
                <IndexRouter/>

                {
                    this.state.tabbarShow && <ul>
                        <li>电影</li>
                        <li>影院</li>
                        <li>我的</li>
                    </ul>
                }
            </div>
        );
    }
}